<!DOCTYPE html>


<html theme="dark" showBanner="true" hasBanner="false" > 
<link href="/blog/fontawesome/css/fontawesome.css" rel="stylesheet">
<link href="/blog/fontawesome/css/brands.css" rel="stylesheet">
<link href="/blog/fontawesome/css/solid.css" rel="stylesheet">
<script src="/blog/js/color.global.min.js" ></script>
<script src="/blog/js/load-settings.js" ></script>
<head>
  <meta charset="utf-8">
  
  
  

  
  <title>Hexo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

  <link rel="preload" href="/blog/css/fonts/Roboto-Regular.ttf" as="font" type="font/ttf" crossorigin="anonymous">
  <link rel="preload" href="/blog/css/fonts/Roboto-Bold.ttf" as="font" type="font/ttf" crossorigin="anonymous">

  <meta property="og:type" content="website">
<meta property="og:title" content="Hexo">
<meta property="og:url" content="https://zyly2033.gitee.io/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:locale" content="en_US">
<meta property="article:author" content="John Doe">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="/blog/atom.xml" title="Hexo" type="application/atom+xml">
  
  
    <link rel="icon" media="(prefers-color-scheme: light)" href="/blog/images/favicon-light-32.png" sizes="32x32">
    <link rel="icon" media="(prefers-color-scheme: light)" href="/blog/images/favicon-light-128.png" sizes="128x128">
    <link rel="icon" media="(prefers-color-scheme: light)" href="/blog/images/favicon-light-180.png" sizes="180x180">
    <link rel="icon" media="(prefers-color-scheme: light)" href="/blog/images/favicon-light-192.png" sizes="192x192">
    <link rel="icon" media="(prefers-color-scheme: dark)" href="/blog/images/favicon-dark-32.png" sizes="32x32">
    <link rel="icon" media="(prefers-color-scheme: dark)" href="/blog/images/favicon-dark-128.png" sizes="128x128">
    <link rel="icon" media="(prefers-color-scheme: dark)" href="/blog/images/favicon-dark-180.png" sizes="180x180">
    <link rel="icon" media="(prefers-color-scheme: dark)" href="/blog/images/favicon-dark-192.png" sizes="192x192">
  
  
<link rel="stylesheet" href="/blog/css/style.css">

<meta name="generator" content="Hexo 6.3.0"></head>

<body>
  
   
  <div id="main-grid" class="shadow   ">
    <div id="nav" class=" is_home "  >
      <navbar id="navbar">
  <nav id="title-nav">
    <a href="/blog/">
      <div id="vivia-logo">
        <div class="dot"></div>
        <div class="dot"></div>
        <div class="dot"></div>
        <div class="dot"></div>
      </div>
      <div>Hexo </div>
    </a>
  </nav>
  <nav id="main-nav">
    
      <a class="main-nav-link" href="/blog/">Home</a>
    
      <a class="main-nav-link" href="/blog/archives">Archives</a>
    
      <a class="main-nav-link" href="/blog/about">About</a>
    
  </nav>
  <nav id="sub-nav">
    <a id="theme-btn" class="nav-icon">
      <span class="light-mode-icon"><svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="M438.5-829.913v-48q0-17.452 11.963-29.476 11.964-12.024 29.326-12.024 17.363 0 29.537 12.024t12.174 29.476v48q0 17.452-11.963 29.476-11.964 12.024-29.326 12.024-17.363 0-29.537-12.024T438.5-829.913Zm0 747.826v-48q0-17.452 11.963-29.476 11.964-12.024 29.326-12.024 17.363 0 29.537 12.024t12.174 29.476v48q0 17.452-11.963 29.476-11.964 12.024-29.326 12.024-17.363 0-29.537-12.024T438.5-82.087ZM877.913-438.5h-48q-17.452 0-29.476-11.963-12.024-11.964-12.024-29.326 0-17.363 12.024-29.537t29.476-12.174h48q17.452 0 29.476 11.963 12.024 11.964 12.024 29.326 0 17.363-12.024 29.537T877.913-438.5Zm-747.826 0h-48q-17.452 0-29.476-11.963-12.024-11.964-12.024-29.326 0-17.363 12.024-29.537T82.087-521.5h48q17.452 0 29.476 11.963 12.024 11.964 12.024 29.326 0 17.363-12.024 29.537T130.087-438.5Zm660.174-290.87-34.239 32q-12.913 12.674-29.565 12.174-16.653-.5-29.327-13.174-12.674-12.673-12.554-28.826.12-16.152 12.794-28.826l33-35q12.913-12.674 30.454-12.674t30.163 12.847q12.709 12.846 12.328 30.826-.38 17.98-13.054 30.653ZM262.63-203.978l-32 34q-12.913 12.674-30.454 12.674t-30.163-12.847q-12.709-12.846-12.328-30.826.38-17.98 13.054-30.653l33.239-31q12.913-12.674 29.565-12.174 16.653.5 29.327 13.174 12.674 12.673 12.554 28.826-.12 16.152-12.794 28.826Zm466.74 33.239-32-33.239q-12.674-12.913-12.174-29.565.5-16.653 13.174-29.327 12.673-12.674 28.826-13.054 16.152-.38 28.826 12.294l35 33q12.674 12.913 12.674 30.454t-12.847 30.163q-12.846 12.709-30.826 12.328-17.98-.38-30.653-13.054ZM203.978-697.37l-34-33q-12.674-12.913-13.174-29.945-.5-17.033 12.174-29.707t31.326-13.293q18.653-.62 31.326 13.054l32 34.239q11.674 12.913 11.174 29.565-.5 16.653-13.174 29.327-12.673 12.674-28.826 12.554-16.152-.12-28.826-12.794ZM480-240q-100 0-170-70t-70-170q0-100 70-170t170-70q100 0 170 70t70 170q0 100-70 170t-170 70Zm-.247-82q65.703 0 111.475-46.272Q637-414.544 637-480.247t-45.525-111.228Q545.95-637 480.247-637t-111.475 45.525Q323-545.95 323-480.247t45.525 111.975Q414.05-322 479.753-322ZM481-481Z"/></svg></span>
      <span class="dark-mode-icon"><svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="M480.239-116.413q-152.63 0-258.228-105.478Q116.413-327.37 116.413-480q0-130.935 77.739-227.435t206.304-125.043q43.022-9.631 63.87 10.869t3.478 62.805q-8.891 22.043-14.315 44.463-5.424 22.42-5.424 46.689 0 91.694 64.326 155.879 64.325 64.186 156.218 64.186 24.369 0 46.978-4.946 22.609-4.945 44.413-14.076 42.826-17.369 62.967 1.142 20.142 18.511 10.511 61.054Q807.174-280 712.63-198.206q-94.543 81.793-232.391 81.793Zm0-95q79.783 0 143.337-40.217 63.554-40.218 95.793-108.283-15.608 4.044-31.097 5.326-15.49 1.283-31.859.805-123.706-4.066-210.777-90.539-87.071-86.473-91.614-212.092-.24-16.369.923-31.978 1.164-15.609 5.446-30.978-67.826 32.478-108.282 96.152Q211.652-559.543 211.652-480q0 111.929 78.329 190.258 78.329 78.329 190.258 78.329ZM466.13-465.891Z"/></svg></span>
    </a>
    
      <a id="nav-rss-link" class="nav-icon mobile-hide" href="/blog/atom.xml" title="RSS Feed">
        <svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="M198-120q-25.846 0-44.23-18.384-18.384-18.385-18.384-44.23 0-25.846 18.384-44.23 18.384-18.385 44.23-18.385 25.846 0 44.23 18.385 18.384 18.384 18.384 44.23 0 25.845-18.384 44.23Q223.846-120 198-120Zm538.385 0q-18.846 0-32.923-13.769-14.076-13.769-15.922-33.23-8.692-100.616-51.077-188.654-42.385-88.039-109.885-155.539-67.5-67.501-155.539-109.885Q283-663.462 182.385-672.154q-19.461-1.846-33.23-16.23-13.769-14.385-13.769-33.846t14.076-32.922q14.077-13.461 32.923-12.23 120.076 8.692 226.038 58.768 105.961 50.077 185.73 129.846 79.769 79.769 129.846 185.731 50.077 105.961 58.769 226.038 1.231 18.846-12.538 32.922Q756.461-120 736.385-120Zm-252 0q-18.231 0-32.423-13.461t-18.653-33.538Q418.155-264.23 348.886-333.5q-69.27-69.27-166.501-84.423-20.077-4.462-33.538-18.961-13.461-14.5-13.461-33.346 0-19.076 13.884-33.23 13.884-14.153 33.115-10.922 136.769 15.384 234.384 112.999 97.615 97.615 112.999 234.384 3.231 19.23-10.538 33.115Q505.461-120 484.385-120Z"/></svg>
      </a>
    
    <div id="nav-menu-btn" class="nav-icon">
      <svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="M177.37-252.282q-17.453 0-29.477-11.964-12.024-11.963-12.024-29.326t12.024-29.537q12.024-12.174 29.477-12.174h605.26q17.453 0 29.477 11.964 12.024 11.963 12.024 29.326t-12.024 29.537q-12.024 12.174-29.477 12.174H177.37Zm0-186.218q-17.453 0-29.477-11.963-12.024-11.964-12.024-29.326 0-17.363 12.024-29.537T177.37-521.5h605.26q17.453 0 29.477 11.963 12.024 11.964 12.024 29.326 0 17.363-12.024 29.537T782.63-438.5H177.37Zm0-186.217q-17.453 0-29.477-11.964-12.024-11.963-12.024-29.326t12.024-29.537q12.024-12.174 29.477-12.174h605.26q17.453 0 29.477 11.964 12.024 11.963 12.024 29.326t-12.024 29.537q-12.024 12.174-29.477 12.174H177.37Z"/></svg>
    </div>
  </nav>
</navbar>
<div id="nav-dropdown" class="hidden">
  <div id="dropdown-link-list">
    
      <a class="nav-dropdown-link" href="/blog/">Home</a>
    
      <a class="nav-dropdown-link" href="/blog/archives">Archives</a>
    
      <a class="nav-dropdown-link" href="/blog/about">About</a>
    
    
      <a class="nav-dropdown-link" href="/blog/atom.xml" title="RSS Feed">RSS</a>
     
    </div>
</div>
<script>
  let dropdownBtn = document.getElementById("nav-menu-btn");
  let dropdownEle = document.getElementById("nav-dropdown");
  dropdownBtn.onclick = function() {
    dropdownEle.classList.toggle("hidden");
  }
</script>
    </div>
    <div id="sidebar-wrapper">
      <sidebar id="sidebar">
  
    <div class="widget-wrap">
  <div class="info-card">
    <div class="avatar">
      
      <div class="img-dim"></div>
    </div>
    <div class="info">
      <div class="username">Your Name </div>
      <div class="dot"></div>
      <div class="subtitle">This is the subtitle </div>
      <div class="link-list">
        
          <a class="link-btn" target="_blank" rel="noopener" href="https://twitter.com" title="Twitter"><i class="fa-brands fa-twitter"></i></a>
        
          <a class="link-btn" target="_blank" rel="noopener" href="https://store.steampowered.com" title="Steam"><i class="fa-brands fa-steam"></i></a>
        
          <a class="link-btn" target="_blank" rel="noopener" href="https://github.com" title="GitHub"><i class="fa-brands fa-github"></i></a>
         
      </div>  
    </div>
  </div>
</div>

  
  <div class="sticky">
    
      



    
      

    
      
  <div class="widget-wrap">
    <div class="widget">
      <h3 class="widget-title">Archives</h3>
      
      
        <a class="archive-link" href="/blog/archives/2023/09 ">
          September 2023 
          <div class="archive-count">8 </div>
        </a>
      
    </div>
  </div>


    
      
  <div class="widget-wrap">
    <div class="widget">
      <h3 class="widget-title">Recent Posts</h3>
      <ul>
        
          <a class="recent-link" href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F/" title="" >
            <div class="recent-link-text">
              (no title)
            </div>
          </a>
        
          <a class="recent-link" href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%E5%AD%90%E7%B3%BB%E7%BB%9F/" title="" >
            <div class="recent-link-text">
              (no title)
            </div>
          </a>
        
          <a class="recent-link" href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%20plane/" title="" >
            <div class="recent-link-text">
              (no title)
            </div>
          </a>
        
          <a class="recent-link" href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%20framebuffer/" title="" >
            <div class="recent-link-text">
              (no title)
            </div>
          </a>
        
          <a class="recent-link" href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%20crtc/" title="" >
            <div class="recent-link-text">
              (no title)
            </div>
          </a>
        
      </ul>
    </div>
  </div>

    
  </div>
</sidebar>
    </div>
    <div id="content-body">
      
   

<article id="post-rk3399/Rockchip RK3399 - DRM驱动程序" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
   
  <div class="article-inner">
    <div class="article-main">
      <header class="article-header">
        
<div class="main-title-bar">
  <div class="main-title-dot"></div>
  
    
      <h1 itemprop="name">
        <a class="p-name article-title" href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F/">Untitled</a>
      </h1>
    
  
</div>

        <div class='meta-info-bar'>
          <div class="meta-info">
  <time class="dt-published" datetime="2023-09-11T12:23:16.294Z" itemprop="datePublished">2023-09-11</time>
</div>
          <div class="need-seperator meta-info">
            <div class="meta-cate-flex">
  
    Uncategorized 
   
</div>
  
          </div>
          <div class="wordcount need-seperator meta-info">
            5.5k words 
          </div>
        </div>
        
      </header>
      <div class="e-content article-entry" itemprop="articleBody">
        
          <div class="truncate-text">
            如果我们需要编写一个DRM驱动，我们应该怎么做呢？具体流程如下：
(1) 定义struct drm_driver，并初始化成员name、desc、data、major、minor、driver_features、fops、dumb_create等；
(2)调用drm_dev_alloc函数分配并初始化一个struct drm_device；
(3) 调用drm_mode_config_init初始化drm_device中mode_config结构体；
(4) 调用drm_xxx_init创建 plane、crtc、encoder、connector 这4个 drm_mode_object；
(5) 调用drm_dev_register注册drm_device；
一、设备树配置一个显示子系统由LCD控制器（vop）、接口控制器（mipi，lvds，hdmi、edp、dp等)、液晶背光，电源等多个独立的功能模块构成。
因此DRM驱动是由一系列相关功能模块的驱动的结合，它包含了vop、mipi、lvds、hdmi、edp、dp、backlight等等显示通路上的依赖模块。只有这些相互依...  
          </div>
        
      </div>

         
    </div>
    
     
    <a class="right-panel  non-pic  "
      
      href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F/" 
    >
       
      <i class="fa-solid fa-angle-right non-pic"></i>
       
    </a>
     
  </div>
  
</article>

 

   

<article id="post-rk3399/Rockchip RK3399 - DRM子系统" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
   
  <div class="article-inner">
    <div class="article-main">
      <header class="article-header">
        
<div class="main-title-bar">
  <div class="main-title-dot"></div>
  
    
      <h1 itemprop="name">
        <a class="p-name article-title" href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%E5%AD%90%E7%B3%BB%E7%BB%9F/">Untitled</a>
      </h1>
    
  
</div>

        <div class='meta-info-bar'>
          <div class="meta-info">
  <time class="dt-published" datetime="2023-09-11T12:23:16.258Z" itemprop="datePublished">2023-09-11</time>
</div>
          <div class="need-seperator meta-info">
            <div class="meta-cate-flex">
  
    Uncategorized 
   
</div>
  
          </div>
          <div class="wordcount need-seperator meta-info">
            21k words 
          </div>
        </div>
        
      </header>
      <div class="e-content article-entry" itemprop="articleBody">
        
          <div class="truncate-text">
            从开始接触音频子系统到如今已经两个多月，说实话花费的时间的确有点长了。从今天起我们开始接触DRM，网上已经有很多优秀的关于DRM的文章了，因此我们学习直接去学习一些优秀的文章即可。后面有关DRM相关的文章我们会大量参考DRM (Direct Rendering Manager)。
一、DRM介绍1.1 DRM概述linux内核中包含两类图形显示设备驱动框架：

FB设备：Framebuffer图形显示框架;
DRM：直接渲染管理器（Direct Rendering Manager），是linux目前主流的图形显示框架；

在实际场景中，具体选择哪一种图形设备驱动框架取决于我们自己的业务需求。
1.1.1 Frambebuffer驱动Frambebuffer驱动具有以下特征：

直接控制显卡的帧缓冲区，提供基本的显卡输出功能；

使用一些内核数据结构和API来管理图形界面，并提供一组接口与用户空间的应用程序进行通信；

相对简单，适合于嵌入式系统或者不需要高性能图形的应用场景。


1.1.2 DRM驱动相比FB（Framebuffer）架构，DRM更能适应当前日益更新的显示硬件；...  
          </div>
        
      </div>

         
    </div>
    
     
    <a class="right-panel  non-pic  "
      
      href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%E5%AD%90%E7%B3%BB%E7%BB%9F/" 
    >
       
      <i class="fa-solid fa-angle-right non-pic"></i>
       
    </a>
     
  </div>
  
</article>

 

   

<article id="post-rk3399/Rockchip RK3399 - DRM plane" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
   
  <div class="article-inner">
    <div class="article-main">
      <header class="article-header">
        
<div class="main-title-bar">
  <div class="main-title-dot"></div>
  
    
      <h1 itemprop="name">
        <a class="p-name article-title" href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%20plane/">Untitled</a>
      </h1>
    
  
</div>

        <div class='meta-info-bar'>
          <div class="meta-info">
  <time class="dt-published" datetime="2023-09-11T12:23:16.222Z" itemprop="datePublished">2023-09-11</time>
</div>
          <div class="need-seperator meta-info">
            <div class="meta-cate-flex">
  
    Uncategorized 
   
</div>
  
          </div>
          <div class="wordcount need-seperator meta-info">
            6.2k words 
          </div>
        </div>
        
      </header>
      <div class="e-content article-entry" itemprop="articleBody">
        
          <div class="truncate-text">
            一、plane数据结构1.1 struct drm_planelinux内核使用struct drm_plane表示一个plane，它们从一个drm_framebuffer接收输入数据，并将其传递给一个drm_crtc。plane控制颜色转换，并且还参与输入像素的颜色转换。定义include&#x2F;drm&#x2F;drm_plane.h；
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314...  
          </div>
        
      </div>

         
    </div>
    
     
    <a class="right-panel  non-pic  "
      
      href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%20plane/" 
    >
       
      <i class="fa-solid fa-angle-right non-pic"></i>
       
    </a>
     
  </div>
  
</article>

 

   

<article id="post-rk3399/Rockchip RK3399 - DRM framebuffer" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
   
  <div class="article-inner">
    <div class="article-main">
      <header class="article-header">
        
<div class="main-title-bar">
  <div class="main-title-dot"></div>
  
    
      <h1 itemprop="name">
        <a class="p-name article-title" href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%20framebuffer/">Untitled</a>
      </h1>
    
  
</div>

        <div class='meta-info-bar'>
          <div class="meta-info">
  <time class="dt-published" datetime="2023-09-11T12:23:16.198Z" itemprop="datePublished">2023-09-11</time>
</div>
          <div class="need-seperator meta-info">
            <div class="meta-cate-flex">
  
    Uncategorized 
   
</div>
  
          </div>
          <div class="wordcount need-seperator meta-info">
            2.8k words 
          </div>
        </div>
        
      </header>
      <div class="e-content article-entry" itemprop="articleBody">
        
          <div class="truncate-text">
            一 Framebuffer数据结构
在DRM框架中，Framebuffer用于存储需要显示的内容，存储的信息包括：

需要显示的内容在内存区域的引用；

存储在内存中的帧的格式；

内存区域的激活区域（即将要显示的内容）；


DRM Framebuffer是一个虚拟的对象，它依赖于特定的实现。Framebuffer实现依赖于：

依赖于内存管理模块，比如GEM；
依赖于显示控制器的能力：
支持DMA传输类型（可以是连续内存或者Scatter Gather）；
IOMMU;



1.1 struct drm_framebufferlinux内核使用struct drm_framebuffer表示一个帧缓冲，包括像素格式、分辨率和显存地址等信息。定义在include&#x2F;drm&#x2F;drm_framebuffer.h；
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676...  
          </div>
        
      </div>

         
    </div>
    
     
    <a class="right-panel  non-pic  "
      
      href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%20framebuffer/" 
    >
       
      <i class="fa-solid fa-angle-right non-pic"></i>
       
    </a>
     
  </div>
  
</article>

 

   

<article id="post-rk3399/Rockchip RK3399 - DRM crtc" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
   
  <div class="article-inner">
    <div class="article-main">
      <header class="article-header">
        
<div class="main-title-bar">
  <div class="main-title-dot"></div>
  
    
      <h1 itemprop="name">
        <a class="p-name article-title" href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%20crtc/">Untitled</a>
      </h1>
    
  
</div>

        <div class='meta-info-bar'>
          <div class="meta-info">
  <time class="dt-published" datetime="2023-09-11T12:23:16.185Z" itemprop="datePublished">2023-09-11</time>
</div>
          <div class="need-seperator meta-info">
            <div class="meta-cate-flex">
  
    Uncategorized 
   
</div>
  
          </div>
          <div class="wordcount need-seperator meta-info">
            10k words 
          </div>
        </div>
        
      </header>
      <div class="e-content article-entry" itemprop="articleBody">
        
          <div class="truncate-text">
            一、LCD硬件原理1.1 CRT介绍CRT是阴极射线管（Cathode Ray Tube）的缩写，它是一种使用电子束在荧光屏上创建图像的显示设备。CRT显示器在过去很长一段时间内是主流的显示技术，现已被液晶显示屏或其他新兴技术所替代。
在CRT显示器中，扫描电子束从左到右、从上到下移动，照亮屏幕上的荧光点，从而创建图像。电子束每秒多次扫描整个屏幕，产生闪烁效果，需要与正在显示的内容同步。
随着LCD、LED和OLED等新型显示技术的出现，底层原理已经发生了变化。这些显示器不再使用扫描电子束，而是使用可以单独控制发光或阻挡光的像素矩阵。这使得图像更加清晰，刷新率更快，能源效率也得到了提高。
然而，刷新显示的基本概念并没有发生很大变化。显示内容仍然通过向每个像素发送信号来控制其亮度和颜色来进行更新。这些信号由显示控制器根据输入视频信号生成，并且它们确定屏幕上显示的内容。
1.2 LCD示意图下图是LCD示意图，里面的每个点就是一个像素点。它里面有一个电子枪，一边移动，一边发出各种颜色的光。用动态图表示如下：

电子枪是如何移动的？

有一条Pixel Clock时钟线与LCD相连，每...  
          </div>
        
      </div>

         
    </div>
    
     
    <a class="right-panel  non-pic  "
      
      href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%20crtc/" 
    >
       
      <i class="fa-solid fa-angle-right non-pic"></i>
       
    </a>
     
  </div>
  
</article>

 

   

<article id="post-rk3399/Rockchip RK3399 - DRM connector" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
   
  <div class="article-inner">
    <div class="article-main">
      <header class="article-header">
        
<div class="main-title-bar">
  <div class="main-title-dot"></div>
  
    
      <h1 itemprop="name">
        <a class="p-name article-title" href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%20connector/">Untitled</a>
      </h1>
    
  
</div>

        <div class='meta-info-bar'>
          <div class="meta-info">
  <time class="dt-published" datetime="2023-09-11T12:23:16.158Z" itemprop="datePublished">2023-09-11</time>
</div>
          <div class="need-seperator meta-info">
            <div class="meta-cate-flex">
  
    Uncategorized 
   
</div>
  
          </div>
          <div class="wordcount need-seperator meta-info">
            270 words 
          </div>
        </div>
        
      </header>
      <div class="e-content article-entry" itemprop="articleBody">
        
          <div class="truncate-text">
            3.1.3 struct drm_connectorlinux内核使用struct drm_connector来表示一个连接器，用于连接编码器和显示设备。
3.1.3 struct drm_encoderlinux内核使用struct drm_encoder来表示一个编码器，用于连接CRT控制器和显示设备。
3.2 struct drm_devicelinux内核使用struct drm_device来对一个DRM硬件设备进行抽象，包括所有相关的硬件和软件信息。定义在：
3.3 struct drm_driverlinux内核使用struct drm_driver来表示一个DRM设备驱动，包括所有的操作函数和参数。定义在：
3.4 struct drm_filelinux内核使用struct drm_file来表示一个打开的文件，包括该文件的访问权限和相关的上下文信息。
3.6 struct drm_vma_node表示一个虚拟内存区域的结构体，用于管理显存对象的虚拟内存映射。
3.8 struct  drm_mode_config表示显卡的配置信息的结构体，包括 CRTC、编码...  
          </div>
        
      </div>

         
    </div>
    
     
    <a class="right-panel  non-pic  "
      
      href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%20connector/" 
    >
       
      <i class="fa-solid fa-angle-right non-pic"></i>
       
    </a>
     
  </div>
  
</article>

 

   

<article id="post-rk3399/Rockchip RK3399 - DRM  gem" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
   
  <div class="article-inner">
    <div class="article-main">
      <header class="article-header">
        
<div class="main-title-bar">
  <div class="main-title-dot"></div>
  
    
      <h1 itemprop="name">
        <a class="p-name article-title" href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%20%20gem/">Untitled</a>
      </h1>
    
  
</div>

        <div class='meta-info-bar'>
          <div class="meta-info">
  <time class="dt-published" datetime="2023-09-11T12:23:16.111Z" itemprop="datePublished">2023-09-11</time>
</div>
          <div class="need-seperator meta-info">
            <div class="meta-cate-flex">
  
    Uncategorized 
   
</div>
  
          </div>
          <div class="wordcount need-seperator meta-info">
            592 words 
          </div>
        </div>
        
      </header>
      <div class="e-content article-entry" itemprop="articleBody">
        
          <div class="truncate-text">
            一、DRM核心数据结构1.1 struct drm_gem_objectlinux内核中使用struct drm_gem_object表示GEM对象，驱动一般需要用私有信息来扩展GEM对象，因此struct drm_gem_object都是嵌入在驱动私有GEM结构体内的。
创建一个GEM对象，驱动为自有GEM对象申请内存，并通过drm_gem_object_init(struct drm_device* ，struct drm_gem_object *，size_t )来初始化嵌入在其中的struct drm_gem_object。
struct drm_gem_object定义在include&#x2F;drm&#x2F;drm_gem.h:
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899...  
          </div>
        
      </div>

         
    </div>
    
     
    <a class="right-panel  non-pic  "
      
      href="/blog/2023/09/11/rk3399/Rockchip%20RK3399%20-%20DRM%20%20gem/" 
    >
       
      <i class="fa-solid fa-angle-right non-pic"></i>
       
    </a>
     
  </div>
  
</article>

 

   

<article id="post-hello-world" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
   
  <div class="article-inner">
    <div class="article-main">
      <header class="article-header">
        
<div class="main-title-bar">
  <div class="main-title-dot"></div>
  
    
      <h1 itemprop="name">
        <a class="p-name article-title" href="/blog/2023/09/11/hello-world/">Hello World</a>
      </h1>
    
  
</div>

        <div class='meta-info-bar'>
          <div class="meta-info">
  <time class="dt-published" datetime="2023-09-11T11:16:54.872Z" itemprop="datePublished">2023-09-11</time>
</div>
          <div class="need-seperator meta-info">
            <div class="meta-cate-flex">
  
    Uncategorized 
   
</div>
  
          </div>
          <div class="wordcount need-seperator meta-info">
            78 words 
          </div>
        </div>
        
      </header>
      <div class="e-content article-entry" itemprop="articleBody">
        
          <div class="truncate-text">
            Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new &quot;My New Post&quot;

More info: Writing
Run server1$ hexo server

More info: Server
Generate static files1$ hexo generate

More info: Generating
Deploy to remote sites1$ hexo deploy

More info: Deployment
  
          </div>
        
      </div>

         
    </div>
    
     
    <a class="right-panel  non-pic  "
      
      href="/blog/2023/09/11/hello-world/" 
    >
       
      <i class="fa-solid fa-angle-right non-pic"></i>
       
    </a>
     
  </div>
  
</article>

 



    </div>
    <div id="footer-wrapper">
      <footer id="footer">
  
  <div id="footer-info" class="inner">
    
    &copy; 2023 Your Name<br>
    Powered by <a href="https://hexo.io/" target="_blank">Hexo</a> & Theme <a target="_blank" rel="noopener" href="https://github.com/saicaca/hexo-theme-vivia">Vivia</a>
  </div>
</footer>

    </div>
    <div class="back-to-top-wrapper">
    <button id="back-to-top-btn" class="back-to-top-btn hide" onclick="topFunction()">
        <i class="fa-solid fa-angle-up"></i>
    </button>
</div>

<script>
    function topFunction() {
        window.scroll({ top: 0, behavior: 'smooth' });
    }
    let btn = document.getElementById('back-to-top-btn');
    function scrollFunction() {
        if (document.body.scrollTop > 600 || document.documentElement.scrollTop > 600) {
            btn.classList.remove('hide')
        } else {
            btn.classList.add('hide')
        }
    }
    window.onscroll = function() {
        scrollFunction();
    }
</script>

  </div>
  <script src="/blog/js/light-dark-switch.js"></script>
</body>
</html>
